#define INT8U char
#define OS_EXT extern
#define OS_LOWEST_PRIO 63
#define OS_RDY_TBL_SIZE ((OS_LOWEST_PRIO) / 8u + 1u)

#if OS_LOWEST_PRIO <= 63u

typedef INT8U OS_PRIO;

#else

typedef INT16U OS_PRIO;

#endif

OS_EXT OS_PRIO OSRdyTbl[OS_RDY_TBL_SIZE];

OS_EXT OS_PRIO OSRdyGrp;


ptcb->OSTCBY = (INT8U)(prio >> 3u);

ptcb->OSTCBX = (INT8U)(prio & 0x07u);

ptcb->OSTCBBitY = (OS_PRIO)(1uL << ptcb->OSTCBY);

ptcb->OSTCBBitX = (OS_PRIO)(1uL << ptcb->OSTCBX);

if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY)
{

    OSRdyGrp |= ptcb->OSTCBBitY;
    OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX;
}
//OSTCBBitY OSTCBBitX OSTCBY初始化任务的时候被赋值, 如下

OSTCBY = 1;
OSTCBBitY = 0b00000010;
OSTCBX = 4;
OSTCBBitX = 0b00010000